package cn.ynu.cmrs.utils;

import cn.ynu.cmrs.R;
import android.app.Activity;
import android.content.Intent;

/**
 * Helper class, Various random functions
 * 
 * @author Yasha
 *
 */
public class Helper {
	
 /**
  * Sharing via SMS with friends
  * 
  * @param activity The Activity which want execute this method
  */
	public static void share(Activity activity) {
		String text = activity.getString(R.string.introduceTo);
		Intent shareIntent = new Intent(Intent.ACTION_SEND);
        shareIntent.setType("text/plain");
        shareIntent.putExtra(Intent.EXTRA_TEXT, text);
        shareIntent.putExtra(Intent.EXTRA_SUBJECT, "");
        activity.startActivity(Intent.createChooser(shareIntent, activity.getString(R.string.share)));
	}
}
